package com.chanzany.prototype.spring;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class SpringConfig {
    @Bean
//    @Scope("singleton")
    @Scope("prototype")
    public Customer customer(){
        Customer customer = new Customer();
        customer.setName("张三");
        return customer;
    }
}
